package com.shd.edanpei.bean;

import android.graphics.ImageDecoder;
import android.text.TextUtils;

import com.shd.edanpei.R;
import com.shd.edanpei.common.Constant;
import com.shd.edanpei.enums.OrderTypeEnum;
import com.shd.edanpei.enums.PayStatusEnum;
import com.shd.edanpei.util.DateUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by mc on 2018/9/25.
 * yang-wen-wen
 */

public class OrderDetailsModel {
    /**
     * applyInfo : {"carNo":"云a22222","drivingDistance":50,"carStatus":"全款","carAge":"1年以内","haveCarInsurance":true,"insuranceTerm":"2015-09-23至2018-09-23","mortgageBank":"","remainMortgageAmount":0,"advanceAmount":0,"haveOverdue":false,"overdueItem":"","overdueAmount":0,"overdueDay":0,"refuseReason":"","cancelReason":""}
     * imgInfo : {"idCardPic":[],"bankPic":[],"householdRegister":[],"maritalCert":[],"carCert":[],"carWarranty":[],"creditCert":[],"supplement":[]}
     * baseInfo : {"orderId":30,"orderNo":"18092333933479055756","createTime":1537696557000,"payDepositTime":"","depositNo":"","firstTime":"","lastTime":"","payServiceTime":"","serviceNo":"","passLoanTime":"","firmLoanTime":"","cancelOrderTime":"","drawbanckTime":"","payDepositAmount":0,"payServiceAmount":0,"payDepositType":"","payServiceType":"","serviceFee":0,"userStatus":1,"managerStatus":0,"applyRepaymentType":"先息后本","applyTerm":"随借随还","applyInterest":"4.7 - 5.2 厘","orderType":1,"applyAmount":30,"area":"浙江省 杭州市 滨江区","orderStatus":1,"remark":"","createUserId":55}
     * customerInfo : {"customerId":56,"customerName":"虎牢关战神","birthday":"2018-09-23","sex":0,"idCardNo":"853828328343732283","mobile":"15046506540","bankCardNo":"543832482786505406540","isMarrage":false,"address":"浙江省 杭州市 滨江区","detailAddress":"杭州西湖","income":"3K以下","industry":"技术","spouseName":"","spouseMobile":""}
     * firstResult : {"firstAmount":0,"firstRate":0,"firstTerm":"","firstMode":"","firstDay":""}
     * finalResult : {"lastAmount":0,"lastRate":0,"lastTerm":"","lastMode":"","lastDay":""}
     */

    private ApplyInfoBean applyInfo;
    private ImgInfoBean imgInfo;
    private BaseInfoBean baseInfo;
    private CustomerInfoBean customerInfo;
    private FirstResultBean firstResult;
    private FinalResultBean finalResult;
    private ManagerBean manager;
    private boolean isPrivacy;//抢单详情页，需隐藏一些参数

    public ApplyInfoBean getApplyInfo() {
        return applyInfo;
    }

    public ImgInfoBean getImgInfo() {
        return imgInfo;
    }

    public BaseInfoBean getBaseInfo() {
        return baseInfo;
    }

    public CustomerInfoBean getCustomerInfo() {
        return customerInfo;
    }

    public FirstResultBean getFirstResult() {
        return firstResult;
    }

    public FinalResultBean getFinalResult() {
        return finalResult;
    }

    public ManagerBean getManager() {
        return manager;
    }

    public boolean isPrivacy() {
        return isPrivacy;
    }

    public void setPrivacy(boolean privacy) {
        isPrivacy = privacy;
    }

    public static class ManagerBean {
        /**
         * avatarUrl :
         * mobile : 18888888888
         * realName : 周刘通
         * companyName : 阿里巴巴集团
         * robTime : 1538126425000
         */

        private String avatarUrl;
        private String mobile;
        private String realName;
        private String companyName;
        private long robTime;
        private int id;

        public String getAvatarUrl() {
            return avatarUrl;
        }

        public void setAvatarUrl(String avatarUrl) {
            this.avatarUrl = avatarUrl;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public String getRealName() {
            return TextUtils.isEmpty(realName) ? "" : realName.substring(0, 1) + "**";
        }

        public void setRealName(String realName) {
            this.realName = realName;
        }

        public String getCompanyName() {
            return companyName;
        }

        public void setCompanyName(String companyName) {
            this.companyName = companyName;
        }

        public String getRobTime() {
            return DateUtils.formatTime(robTime, Constant.Time.YYYY_MM_DD_HH_MM_SS.getTime());
        }

        public void setRobTime(long robTime) {
            this.robTime = robTime;
        }

        public int getId() {
            return id;
        }
    }

    public static class ApplyInfoBean {
        /**
         * carNo : 云a22222
         * drivingDistance : 50
         * carStatus : 全款
         * carAge : 1年以内
         * haveCarInsurance : true
         * insuranceTerm : 2015-09-23至2018-09-23
         * mortgageBank :
         * remainMortgageAmount : 0.0
         * advanceAmount : 0.0
         * haveOverdue : false
         * overdueItem :
         * overdueAmount : 0
         * overdueDay : 0
         * refuseReason :
         * cancelReason :
         */

        private String carNo;
        private String drivingDistance;
        private String carStatus;
        private String carAge;
        private boolean haveCarInsurance;
        private String insuranceTerm;
        private String mortgageBank;
        private String remainMortgageAmount;
        private String advanceAmount;
        //        private boolean haveOverdue;
        private String overdueItem;
        private String overdueAmount;
        private String overdueDay;
        private String refuseReason;
        private String cancelReason;

        private String roomArea;
        private String roomSize;
        private String roomType;
        private String roomStatus = "";
        private String roomAge;
        private boolean haveOtherHouse;
        private boolean haveCompany;
        private String operationTerm;
        private String operationState;
        private String companyShare;
        private String liabilitiesStatus;
        private String estimatedRevenue;
        private String companyName;
        private boolean isCreditHouse;//住房
        private boolean isCreditInsurance;//保单信用贷
        private boolean isCreditFund;//公积金

        public boolean isCreditHouse() {
            return isCreditHouse;
        }

        public void setCreditHouse(boolean creditHouse) {
            isCreditHouse = creditHouse;
        }

        public boolean isCreditInsurance() {
            return isCreditInsurance;
        }

        public void setCreditInsurance(boolean creditInsurance) {
            isCreditInsurance = creditInsurance;
        }

        public boolean isCreditFund() {
            return isCreditFund;
        }

        public void setCreditFund(boolean creditFund) {
            isCreditFund = creditFund;
        }

        public String getCompanyName() {
            return companyName;
        }

        public void setCompanyName(String companyName) {
            this.companyName = companyName;
        }

        public String getHoldRatio() {
            return holdRatio;
        }

        public void setHoldRatio(String holdRatio) {
            this.holdRatio = holdRatio;
        }

        private String holdRatio;

        public String getEstimatedRevenue() {
            return estimatedRevenue;
        }

        public void setEstimatedRevenue(String estimatedRevenue) {
            this.estimatedRevenue = estimatedRevenue;
        }

        //        private boolean haveField;
//        private String fieldArea;
        private String houseDetailAddress;
        private String evaluatePrice;


        public String getCarNo() {
            return carNo;
        }


        public String getDrivingDistance() {
            return drivingDistance + Constant.Unit.WANKM.getUnit();
        }


        public String getCarStatus() {
            return carStatus;
        }

        public boolean isMortgage() {
            return carStatus.equals(PayStatusEnum.mortgage.getStr());
        }

        public boolean isHouseMortgage() {
            return roomStatus.equals(PayStatusEnum.mortgage.getStr());
        }


        public String getCarAge() {
            return carAge;
        }


        public boolean isHaveCarInsurance() {
            return haveCarInsurance;
        }

        public boolean haveCarInsurance() {
            return haveCarInsurance;
        }


        public String getInsuranceTerm() {
            return insuranceTerm;
        }


        public String getMortgageBank() {
            return mortgageBank;
        }


        public String getRemainMortgageAmount() {
            return remainMortgageAmount + Constant.Unit.YUAN.getUnit();
        }

        public String getAdvanceAmount() {
            return advanceAmount + Constant.Unit.YUAN.getUnit();
        }

//
//        public boolean isHaveOverdue() {
//            return haveOverdue;
//        }
//
//        public boolean haveOverdue() {
//            return haveOverdue;
//        }


        public String getOverdueItem() {
            return overdueItem;
        }


        public String getOverdueAmount() {
            return overdueAmount + Constant.Unit.YUAN.getUnit();
        }


        public String getOverdueDay() {
            return overdueDay + Constant.Unit.DAY.getUnit();
        }


        public String getRefuseReason() {
            return refuseReason;
        }


        public String getCancelReason() {
            return cancelReason;
        }

        public String getRoomArea() {
            return roomArea;
        }

        public String getRoomSize() {
            return roomSize + Constant.Unit.AREA.getUnit();
        }

        public String getRoomType() {
            return roomType;
        }

        public String getRoomStatus() {
            return roomStatus;
        }

        public String getRoomAge() {
            return roomAge;
        }

        public boolean isHaveOtherHouse() {
            return haveOtherHouse;
        }

        public boolean isHaveCompany() {
            return haveCompany;
        }

        public String getOperationTerm() {
            return operationTerm;
        }

        public String getOperationState() {
            return operationState;
        }

        public String getCompanyShare() {
            return companyShare;
        }

        public String getLiabilitiesStatus() {
            return liabilitiesStatus + Constant.Unit.YUAN.getUnit();
        }

//        public boolean isHaveField() {
//            return haveField;
//        }
//
//        public String getFieldArea() {
//            return fieldArea + Constant.Unit.AREA.getUnit();
//        }

        public String getHouseDetailAddress() {
            return houseDetailAddress;
        }

        public String getEvaluatePrice() {
            if (!TextUtils.isEmpty(evaluatePrice)) {
                return "（评估价：" + evaluatePrice + "元）";
            } else {
                return "";
            }
        }

        public String isHave(boolean b) {
            return b ? "有" : "无";
        }


        public List<DataBean> getDataList(BaseInfoBean baseInfoBean) {
            List<DataBean> list = new ArrayList<>();
            if (baseInfoBean.getOrderType() == OrderTypeEnum.house.getKey()) {
                list.add(new DataBean("住房信息", true));
                list.add(new DataBean("住房所在地", getRoomArea()));
                list.add(new DataBean("住房面积", getRoomSize()));
                list.add(new DataBean("住房性质", getRoomType()));
                list.add(new DataBean("房龄", getRoomAge()));
                if (isHouseMortgage()) {
                    list.add(new DataBean("住房现状", getRoomStatus()));
//                    list.add(new DataBean("按揭银行", getMortgageBank()));
//                    list.add(new DataBean("剩余尾款", getRemainMortgageAmount()));
//                    list.add(new DataBean("需要垫资产", getAdvanceAmount(), false, true));
                } else {
                    list.add(new DataBean("住房现状", getRoomStatus()));
                }
                list.add(new DataBean("客户资料", true));
                list.add(new DataBean("订单金额", baseInfoBean.getApplyAmount()));
                list.add(new DataBean("预期比", baseInfoBean.getApplyInterest()));
                list.add(new DataBean("归还方式", baseInfoBean.getApplyRepaymentType()));
                list.add(new DataBean("订单期限", baseInfoBean.getApplyTerm()));
                list.add(new DataBean("其他固定资产", isHave(isHaveOtherHouse())));
                list.add(new DataBean("名下公司", isHave(isHaveCompany())));
                if (isHaveCompany()) {
                    list.add(new DataBean("占股比例", getCompanyShare() + "%"));
                    list.add(new DataBean("经营状况", getOperationState()));
                    list.add(new DataBean("经营年限", getOperationTerm()));
                }

                if (TextUtils.isEmpty(baseInfoBean.getRemark())) {
                    list.add(new DataBean("暂无补充信息", ""));
                } else {
                    list.add(new DataBean("补充信息", baseInfoBean.getRemark()));
                }
//                list.add();
//                if (isHaveField()) {
//                    list.add(new DataBean("名下场地", isHave(isHaveField())));
//                    list.add(new DataBean("场地面积", getFieldArea()));
//                } else {
//                    list.add(new DataBean("名下场地", isHave(isHaveField())));
//                }

            } else if(baseInfoBean.getOrderType() == OrderTypeEnum.car.getKey()){

                list.add(new DataBean("车辆信息", true));
                list.add(new DataBean("车牌号", getCarNo()));
                list.add(new DataBean("车公里数", getDrivingDistance() + Constant.Unit.WANKM.getUnit()));
                list.add(new DataBean("车龄", getCarAge()));

                if (isHouseMortgage()) {
                    list.add(new DataBean("车现状", getCarStatus()));
                } else {
                    list.add(new DataBean("车现状", getCarStatus()));
                }

                list.add(new DataBean("客户资料", true));
                list.add(new DataBean("订单金额", baseInfoBean.getApplyAmount()));
                list.add(new DataBean("预期比", baseInfoBean.getApplyInterest()));
                list.add(new DataBean("归还方式", baseInfoBean.getApplyRepaymentType()));
                list.add(new DataBean("订单期限", baseInfoBean.getApplyTerm()));
                if (isHaveCarInsurance()) {
                    list.add(new DataBean("车辆保险", isHave(isHaveCarInsurance())));
                    list.add(new DataBean("投保期限", getInsuranceTerm()));
                } else {
                    list.add(new DataBean("车辆保险", isHave(isHaveCarInsurance())));
                }
                if (TextUtils.isEmpty(baseInfoBean.getRemark())) {
                    list.add(new DataBean("暂无补充信息", ""));
                } else {
                    list.add(new DataBean("补充信息", baseInfoBean.getRemark()));
                }
            }
            return list;
        }
        public List<DataBean> getDataListPersional(BaseInfoBean baseInfoBean,OrderDetailsModel orderDetailsModel) {
            List<DataBean> list = new ArrayList<>();
            if(baseInfoBean.getOrderType() == OrderTypeEnum.personal.getKey()){
                list.add(new DataBean("借贷金额", baseInfoBean.getApplyAmount()));
                list.add(new DataBean("订单期限", baseInfoBean.getApplyTerm()));
                //list.add(new DataBean("房产证", isHave(baseInfoBean)));
                //list.add(new DataBean("征信报告", baseInfoBean));
            }else if(baseInfoBean.getOrderType() == OrderTypeEnum.enterprise.getKey()){
                list.add(new DataBean("借贷金额", baseInfoBean.getApplyAmount()));
                list.add(new DataBean("订单期限", baseInfoBean.getApplyTerm()));
                list.add(new DataBean("公司名字", orderDetailsModel.getApplyInfo().getCompanyName()));
                list.add(new DataBean("公司股份", orderDetailsModel.getApplyInfo().getHoldRatio()));
            }
            return  list;
        }
    }


    public static class BaseInfoBean {
        /**
         * orderId : 30
         * orderNo : 18092333933479055756
         * createTime : 1537696557000
         * payDepositTime :
         * depositNo :
         * firstTime :
         * lastTime :
         * payServiceTime :
         * serviceNo :
         * passLoanTime :
         * firmLoanTime :
         * cancelOrderTime :
         * drawbanckTime :
         * payDepositAmount : 0
         * payServiceAmount : 0
         * payDepositType :
         * payServiceType :
         * serviceFee : 0
         * userStatus : 1
         * managerStatus : 0
         * applyRepaymentType : 先息后本
         * applyTerm : 随借随还
         * applyInterest : 4.7 - 5.2 厘
         * orderType : 1
         * applyAmount : 30
         * area : 浙江省 杭州市 滨江区
         * orderStatus : 1
         * remark :
         * createUserId : 55
         */

        private int orderId;
        private String orderNo;//订单编号
        private String createTime;
        private String payDepositTime;//支付押金时间
        private String depositNo;
        private String firstTime;//初审时间
        private String lastTime;//终审时间
        private String payServiceTime;//支付服务费时间
        private String serviceNo;//服务费单号
        private String passLoanTime;//放款时间
        private String firmLoanTime;//最终确认时间
        private String cancelOrderTime;//订单取消时间
        private String points;//预计积分
        private String estimatedRevenue;//积分
        private String drawbanckTime;
        private String payDepositAmount;
        private String payServiceAmount;
        private String payDepositType;
        private String payServiceType;
        private String serviceFee;
        private int userStatus;
        private int managerStatus;
        private int managerId;
        private String applyRepaymentType;
        private String applyTerm;
        private String applyInterest;
        private int orderType;
        private String applyAmount;
        private String area;
        private String remark;
        private int createUserId;
        private boolean isPayDeposit;//是否支付押金
        private boolean isPayService;//是否支付服务费
        private String loanCreditPath;//授权书路径
        private  String companyName=null;//企业名称
        private  String holdRatio=null;//个人持股比

        public String getCompanyName() {
            return companyName;
        }

        public void setCompanyName(String companyName) {
            this.companyName = companyName;
        }

        public String getHoldRatio() {
            return holdRatio;
        }

        public void setHoldRatio(String holdRatio) {
            this.holdRatio = holdRatio;
        }

        public String getEstimatedRevenue() {
            return estimatedRevenue;
        }

        public void setEstimatedRevenue(String estimatedRevenue) {
            this.estimatedRevenue = estimatedRevenue;
        }
        public int getOrderId() {
            return orderId;
        }

        public String getOrderNo() {
            return orderNo;
        }

        public String getCreateTime() {
            return createTime;
        }

        public String getPayDepositTime() {
            return payDepositTime;
        }

        public String getDepositNo() {
            return depositNo;
        }

        public String getFirstTime() {
            return firstTime;
        }

        public String getLastTime() {
            return lastTime;
        }

        public String getPayServiceTime() {
            return payServiceTime;
        }

        public String getServiceNo() {
            return serviceNo;
        }

        public String getPassLoanTime() {
            return passLoanTime;
        }

        public String getPoints() {
            return points;
        }

        public void setPoints(String points) {
            this.points = points;
        }

        public String getFirmLoanTime() {
            return firmLoanTime;
        }

        public String getCancelOrderTime() {
            return cancelOrderTime;
        }

        public String getDrawbanckTime() {
            return drawbanckTime;
        }

        public String getPayDepositAmount() {
            return payDepositAmount;
        }

        public String getPayServiceAmount() {
            return payServiceAmount;
        }

        public String getPayDepositType() {
            return payDepositType;
        }

        public String getPayServiceType() {
            return payServiceType;
        }

        public String getServiceFee() {
            return serviceFee;
        }

        public int getUserStatus() {
            return userStatus;
        }

        public void setUserStatus(int userStatus) {
            this.userStatus = userStatus;
        }

        public int getManagerStatus() {
            return managerStatus;
        }

        public void setManagerStatus(int managerStatus) {
            this.managerStatus = managerStatus;
        }


        public int getManagerId() {
            return managerId;
        }

        public String getApplyRepaymentType() {
            return applyRepaymentType;
        }

        public String getApplyTerm() {
            return applyTerm;
        }

        public String getApplyInterest() {
            return applyInterest;
        }

        public int getOrderType() {
            return orderType;
        }

        public String getApplyAmount() {
            return applyAmount + Constant.Unit.WANYUAN.getUnit();
        }

        public String getArea() {
            return area;
        }

        public String getRemark() {
            return remark.isEmpty() ? "暂无补充信息" : remark;
        }

        public int getCreateUserId() {
            return createUserId;
        }

        public boolean isPayDeposit() {
            return isPayDeposit;
        }

        public boolean isPayService() {
            return isPayService;
        }


        public String getLoanCreditPath() {
            return loanCreditPath;
        }

        public void setLoanCreditPath(String loanCreditPath) {
            this.loanCreditPath = loanCreditPath;
        }

        //        DateUtils.formatTime(orderNo, Constant.Time.YYYY_MM_DD_HH_MM)


        public String getTimeInfo() {
            StringBuffer sb = new StringBuffer();

            sb.append("订单编号：" + orderNo);
            if (createTime != null) {
                sb.append("\n创建时间：" + DateUtils.formatTime(Long.parseLong(createTime), Constant.Time.YYYY_MM_DD_HH_MM.getTime()));
            }
            if (isPayDeposit && payDepositTime != null) {
                if(orderType==1||orderType==2){
                    sb.append("\n支付押金时间：" + DateUtils.formatTime(Long.parseLong(payDepositTime), Constant.Time.YYYY_MM_DD_HH_MM.getTime()));
                }

            }
            if (isPayService && payServiceTime != null) {
                sb.append("\n支付服务费时间：" + DateUtils.formatTime(Long.parseLong(payServiceTime), Constant.Time.YYYY_MM_DD_HH_MM.getTime()));
            }

            return sb.toString();
        }
    }


    public static class FirstResultBean {
        /**
         * firstAmount : 0
         * firstRate : 0
         * firstTerm :
         * firstMode :
         * firstDay :
         */

        private String firstAmount;
        private String firstRate;
        private String firstTerm;
        private String firstMode;
        private String firstDay;

        public String getFirstAmount() {
            return firstAmount + Constant.Unit.WANYUAN.getUnit();
        }

        public String getFirstRate() {
            return firstRate + Constant.Unit.LI.getUnit();
        }

        public String getFirstTerm() {
            return firstTerm;
        }

        public String getFirstMode() {
            return firstMode;
        }

        public String getFirstDay() {
            return firstDay + Constant.Unit.DAY.getUnit();
        }

        public boolean isNull() {
            return TextUtils.isEmpty(firstDay);
        }

    }

    public static class FinalResultBean {
        /**
         * lastAmount : 0
         * lastRate : 0
         * lastTerm :
         * lastMode :
         * lastDay :
         */

        private String lastAmount;
        private String lastRate;
        private String lastTerm;
        private String lastMode;
        private String lastDay;

        public String getLastAmount() {
            return lastAmount + Constant.Unit.WANYUAN.getUnit();
        }

        public String getLastRate() {
            return lastRate + Constant.Unit.LI.getUnit();
        }

        public String getLastTerm() {
            return lastTerm;
        }

        public String getLastMode() {
            return lastMode;
        }

        public String getLastDay() {
            return lastDay + Constant.Unit.DAY.getUnit();
        }

        public boolean isNull() {
            return TextUtils.isEmpty(lastDay);
        }

    }


    /**
     * 客户需求数据
     *
     * @return
     */
    public List<DataBean> getCustomerNeedList() {
        List<DataBean> list = new ArrayList<>();
        list.add(new DataBean("预期比", getBaseInfo().getApplyInterest()));
        if(getBaseInfo().getOrderType()==1||getBaseInfo().getOrderType()==2){
            list.add(new DataBean("归还方式", getBaseInfo().getApplyRepaymentType()));
        }
        list.add(new DataBean("订单期限", getBaseInfo().getApplyTerm()));
        return list;
    }


    /**
     * 房屋订单材料数据
     *
     * @param isGone
     * @return
     */
    public List<DataBean> getHouseDataList(boolean isGone) {
        List<DataBean> list = new ArrayList<>();
        list.add(new DataBean("住房所在地", getApplyInfo().getRoomArea()));
        list.add(new DataBean("住房面积", getApplyInfo().getRoomSize()));
        if (!isGone) {
            list.add(new DataBean("住房性质", getApplyInfo().getRoomType()));
            list.add(new DataBean("房龄", getApplyInfo().getRoomAge()));
            list.add(new DataBean("住房现状", getApplyInfo().getRoomStatus()).setHaveBg(true));
            list.add(new DataBean("其他固定资产", getApplyInfo().isHave(getApplyInfo().isHaveOtherHouse())));
            list.add(new DataBean("名下公司", getApplyInfo().isHave(getApplyInfo().isHaveCompany())).setHaveBg(true));
            if (getApplyInfo().isHaveCompany()) {
                list.add(new DataBean("占股比例", getApplyInfo().getCompanyShare() + "%").setHaveBg(true));
                list.add(new DataBean("经营状况", getApplyInfo().getOperationState()).setHaveBg(true));
                list.add(new DataBean("经营年限", getApplyInfo().getOperationTerm()).setHaveBg(true));
            }
//            list.add(new DataBean("名下场地", getApplyInfo().isHave(getApplyInfo().isHaveField())).setHaveBg(true).setTop(true));
//            if (getApplyInfo().isHaveField()) {
//                list.add(new DataBean("场地面积", getApplyInfo().getFieldArea()).setHaveBg(true));
//            }
            list.add(new DataBean("信息补充", getBaseInfo().getRemark()));
        }

        return list;
    }


    public List<DataBean> getCustomerDataList(boolean isPrivacy, boolean isGone) {
        List<DataBean> list = new ArrayList<>();
        if (isPrivacy) {
            list.add(new DataBean("姓名", getCustomerInfo().getCustomerName2()));
        } else {
            list.add(new DataBean("姓名", getCustomerInfo().getCustomerName()));
        }
        list.add(new DataBean("性别", getCustomerInfo().getGender()));
        if (!isGone) {
            if (isPrivacy) {
                list.add(new DataBean("出生日期", getCustomerInfo().getBirthday2()));
            } else {
                list.add(new DataBean("出生日期", getCustomerInfo().getBirthday()));
                list.add(new DataBean("身份证号", getCustomerInfo().getIdCardNo()));
                list.add(new DataBean("联系方式", getCustomerInfo().getMobile()).setTagImg(R.drawable.button_call));
            }
            list.add(new DataBean("婚姻状况", getCustomerInfo().marrageStatus()));
            if (getCustomerInfo().isMarrage()) {
                //已婚
                if (isPrivacy) {
                    list.add(new DataBean("配偶姓名", getCustomerInfo().getSpouseName2()));
                } else {
                    list.add(new DataBean("配偶姓名", getCustomerInfo().getSpouseName()));
                    list.add(new DataBean("配偶联系方式", getCustomerInfo().getSpouseMobile(isPrivacy)));
                }
            } else {
                //未婚
            }

            list.add(new DataBean("当前收入", getCustomerInfo().getIncome()));
            list.add(new DataBean("行业", getCustomerInfo().getIndustry()));
            list.add(new DataBean("常住地址", getCustomerInfo().getAddress()));

            if (isPrivacy) {
            } else {
                list.add(new DataBean("详细地址", getCustomerInfo().getDetailAddress()));
            }

        } else {

        }
        return list;
    }


    /**
     * 车辆订单材料数据
     *
     * @param isGone
     * @return
     */
    public List<DataBean> getCarDataList(boolean isPrivacy, boolean isGone) {
        List<DataBean> list = new ArrayList<>();
        if (isPrivacy) {
            list.add(new DataBean("车牌号", "*******"));
        } else {
            list.add(new DataBean("车牌号", getApplyInfo().getCarNo()));
        }
        list.add(new DataBean("车公里数", getApplyInfo().getDrivingDistance()));
        if (!isGone) {
            list.add(new DataBean("车龄", getApplyInfo().getCarAge()));
            list.add(new DataBean("车现状", getApplyInfo().getCarStatus()));
            list.add(new DataBean("车辆保险", getApplyInfo().isHave(getApplyInfo().haveCarInsurance())).setHaveBg(true));
            if (getApplyInfo().isHaveCarInsurance()) {
                list.add(new DataBean("保险期限", getApplyInfo().getInsuranceTerm()).setHaveBg(true));
            }
            list.add(new DataBean("信息补充", getBaseInfo().getRemark()));
        }

        return list;
    }

    /**
     * 个人信用贷订单材料数据
     *
     * @param isGone
     * @return
     */
    public List<DataBean> getPersonalDataList(boolean isPrivacy, boolean isGone) {
        List<DataBean> list = new ArrayList<>();
            String houst=getApplyInfo().isCreditHouse?"住房信用贷；":"";
            String cred=getApplyInfo().isCreditFund?"公积金信用贷；":"";
            String creditInsurance=getApplyInfo().isCreditFund?"保单信用贷；":"";
            list.add(new DataBean("贷款类型", houst+cred+creditInsurance));
            list.add(new DataBean("订单金额", getBaseInfo().getApplyAmount()));
            list.add(new DataBean("订单期限", getBaseInfo().getApplyTerm()));
            list.add(new DataBean("信息补充", getBaseInfo().getRemark()));


        return list;
    }

    /**
     * 企业税金订单材料数据
     *
     * @param isGone
     * @return
     */
    public List<DataBean> getEnterpriseDataList(boolean isPrivacy, boolean isGone) {
        List<DataBean> list = new ArrayList<>();
        list.add(new DataBean("订单金额", getBaseInfo().getApplyAmount()));
        list.add(new DataBean("订单期限", getBaseInfo().getApplyTerm()));
        list.add(new DataBean("个人持股比", getBaseInfo().getHoldRatio()));
        list.add(new DataBean("企业名称", getApplyInfo().getCompanyName()));
        list.add(new DataBean("信息补充", getBaseInfo().getRemark()));

        return list;
    }
}
